Skip to content

HSEARCH-5517 Adjust index plan updates caused by "association" for deleted entities#4887

Merged
marko-bekhta merged 1 commit into
hibernate:mainfrom
marko-bekhta:fix/HSEARCH-5517-Document-is-updated-instead-of-deleted-on-cascading-delete-in-OneToOne-relations
Jan 8, 2026
Merged

HSEARCH-5517 Adjust index plan updates caused by "association" for deleted entities#4887
marko-bekhta merged 1 commit into
hibernate:mainfrom
marko-bekhta:fix/HSEARCH-5517-Document-is-updated-instead-of-deleted-on-cascading-delete-in-OneToOne-relations

Conversation

@marko-bekhta
Copy link
Copy Markdown
Member

https://hibernate.atlassian.net/browse/HSEARCH-5517


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


@marko-bekhta marko-bekhta force-pushed the fix/HSEARCH-5517-Document-is-updated-instead-of-deleted-on-cascading-delete-in-OneToOne-relations branch from a7668c3 to 2e1f0c0 Compare November 10, 2025 13:28
@marko-bekhta
Copy link
Copy Markdown
Member Author

By the way, this makes me wonder... Can't you reproduce this without cascades? Just be removing both the parent and child explicitly?

I don't think so ... if we start removing things explicitly without cascading, then ORM would force us to set nulls or we'll get Hibernate ORM exceptions about those dangling objects ... (I think we already have tests for that scenario in place)...

handle an edge case

yeah... I only could get it to "fail" with this mapping, removing any other part of what's in was leading to a different oreder of remove events and all was "ok" in a sense that update was planned first but then the remove event from ORM came in and the final plan was correct ... 😖

@marko-bekhta marko-bekhta force-pushed the fix/HSEARCH-5517-Document-is-updated-instead-of-deleted-on-cascading-delete-in-OneToOne-relations branch from 2e1f0c0 to 4ebe234 Compare November 11, 2025 17:50
@yrodiere
Copy link
Copy Markdown
Member

yrodiere commented Jan 5, 2026

Hey. I see this stalled -- were you waiting for some input from me? Because I don't have much to add :)

@marko-bekhta marko-bekhta force-pushed the fix/HSEARCH-5517-Document-is-updated-instead-of-deleted-on-cascading-delete-in-OneToOne-relations branch from 4ebe234 to fd318d4 Compare January 5, 2026 10:34
@marko-bekhta
Copy link
Copy Markdown
Member Author

hey 🙂 👋🏻

were you waiting for some input from me?

it was more like waiting for myself to decide. Each time I open it I think: well it seems fine but can it break some other use case ? 🫣 🙂

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jan 5, 2026

@marko-bekhta marko-bekhta merged commit 632b2dc into hibernate:main Jan 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants